QT       += core gui qt widgets

TEMPLATE = lib
TARGET = qtBaseLib

CONFIG += c++11
#配置信息 CONFIG用来告诉qmake关于应用程序的配置信息。
#CONFIG += qt warn_on release
#指定生成的应用程序名
#TARGET = QLabelBase

include(../qt_ems_app.pri)

CONFIG += dll debug_and_release lib

DEFINES += QBASELIB_LIBRARY__


CONFIG(debug, debug|release) {
    win32: TARGET = $$join(TARGET,,,d)
}

INCLUDEPATH += \
		$$PWD/include/

SOURCES += \
		$$PWD/Label/QLabelBase.cpp \
		$$PWD/Label/QScrollLabel.cpp \
		$$PWD/MyGridLayout/MyGridLayout.cpp \
		$$PWD/LineEdit/QLineEditBase.cpp \
		$$PWD/Config/iniConfig.cpp \
		$$PWD/Button/QButtonBase.cpp \
		$$PWD/Button/QTextButton.cpp

HEADERS += \
		$$PWD/include/QLabelBase.h \
		$$PWD/include/QScrollLabel.H \
		$$PWD/include/iniConfig.h \
		$$PWD/include/QButtonBase.h \
		$$PWD/include/QLineEditBase.h \
		$$PWD/include/MyGridLayout.h \
		$$PWD/include/QCommonWidgets_global.h

target.path = $$DLLDESTDIR
INSTALLS += target

#拷贝公共头文件到发布目录
win32 {
    COPY_SRC = $$replace(PWD, /, \\)
    COPY_DEST = $$replace(PUBLIC_LIB_DIR, /, \\)
    system("mkdir $$COPY_DEST\\include\\qtBaseLib\\")
    system("copy /y $$COPY_SRC\\include\\*.h $$COPY_DEST\\include\\qtBaseLib\\")
}
else {
    system("mkdir $$PUBLIC_LIB_DIR/include/qtBaseLib/")
    system("cp $$PWD/include/*.h $$PUBLIC_LIB_DIR/include/qtBaseLib/")
}
